import request from '@/utils/request'


export function listLock(query) {
  return request({
    url: '/biz/lock/list',
    method: 'get',
    params: query
  })
}

// 查询锁任务列表
export function listLockJob(query) {
  return request({
    url: '/biz/lockJob/list',
    method: 'get',
    params: query
  })
}

// 查询锁任务详细
export function getLockJob(id) {
  return request({
    url: '/biz/lockJob/' + id,
    method: 'get'
  })
}

// 新增锁任务
export function addLockJob(data) {
  return request({
    url: '/biz/lockJob',
    method: 'post',
    data: data
  })
}

// 修改锁任务
export function updateLockJob(data) {
  return request({
    url: '/biz/lockJob',
    method: 'put',
    data: data
  })
}

// 审批锁任务
export function auditLockJob(data) {
  return request({
    url: '/biz/lockJob/audit',
    method: 'put',
    data: data
  })
}

// 删除锁任务
export function delLockJob(id) {
  return request({
    url: '/biz/lockJob/' + id,
    method: 'delete'
  })
}

// 导出锁任务
export function exportLockJob(query) {
  return request({
    url: '/biz/lockJob/export',
    method: 'get',
    params: query
  })
}

export function selectDeviceLockList(query) {
  return request({
    url: '/biz/lock/collect/selectDeviceLockList',
    method: 'get',
    params: query
  })
}
